package org.tbjd.client.interfaces;

import com.google.gwt.user.client.ui.Widget;

public interface WidgetProvider {

	/**
	 * <p>
	 * This method returns the widget for the given object of the given columnIndex
	 * </p>
	 * <p>
	 * This method is used when the caller is a grid or a table
	 * </p>
	 * 
	 * @param o
	 *            object from which the widget will be created
	 * @param columnIndex
	 *            columnIndex the column index determining the widget to return
	 * @return the widget to display
	 */
	public Widget getWidget(Object o, int columnIndex);

	/**
	 * This method returns the widget for the given object
	 * 
	 * @param o
	 *            object from which the widget will be created
	 * @return the widget to display
	 */
	public Widget getWidget(Object o);

}
